#ifndef _SERVICE
#define _SERVICE
#include <pthread.h>
#include <errno.h>
#include <cstdlib>
#include <iostream>
#include "../../utils/net_tool/net_tool.h"
#include "../controller/netctl.h"
#include "../../config/ConfigReader.h"
#include <string.h>
#include "../NodeHandler/NodeHandler.h"
#include "../../cli/CliTask.h"
#include "Exception.h"
#include <map>
class CliService {
    public:
        std::map<std::string, CliTaskExecutor *> taskMap;
        // 注册一条命令任务
        void registerCmd(CliTaskExecutor * executor) ;
        // 执行一条命令
        void executeCmd(std::string cmd) ;

        void start();
};
extern CliService cliService;
void start_web_server();
void start_core_server();
void start_cli_service();
void start_slave_control_service();
#endif